package com.example.shiwuyouproject.ui.fragment.my.viewmodel

import androidx.lifecycle.MutableLiveData
import com.example.shiwuyouproject.base.BaseViewModel

class SettingViewModel:BaseViewModel() {
    private val getRealNameAuthenticatioApi by lazy { RetrofitClient.getApiService() }
    val getPostStatus = MutableLiveData<Boolean>()
    /**
     * 保存毕业院校信息
     *
     */
    fun preservationCard(searchable:String){
        val hashMap:MutableMap<String, String> = HashMap()
        hashMap["searchable"] = searchable
        launch(
            block = {
                val codeStatus = getRealNameAuthenticatioApi.addUserUpdate(hashMap)
                getPostStatus.value=codeStatus.success()
            },
            error = {
                getPostStatus.value=false
            },
            cancel = {
                getPostStatus.value=false
            },
            showErrorToast = false
        )

    }
}